-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Tommy/tool-specific-config-support #1394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…BJ4y9xY61QVrO18ymuVt4SO9nV-z2B4ckaL2f9IU/edit?tab=t.0#heading=h.ffto4e5dwzlf specifically - allow for --tools and dynamic toolset mode together - allow for --tools and --toolsets together
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces tool-specific configuration support via a new --tools flag, enabling users to specify individual tools instead of (or in addition to) toolsets. Users can now compose their MCP server configuration using --tools, --toolsets, --read-only, and --dynamic-toolsets flags in any combination.
Key changes:
- Added
--toolsflag for specifying individual tools by name - Implemented additive composition logic where tools and toolsets can be combined
- Maintained read-only mode enforcement (write tools are skipped even if explicitly requested)
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/toolsets/toolsets.go | Added ToolDoesNotExistError, FindToolByName method to locate tools across all toolsets, and RegisterSpecificTools method to register individual tools with read-only mode support |
| pkg/github/tools.go | Added CleanTools utility function to remove duplicates and trim whitespace from tool names |
| internal/ghmcp/server.go | Added EnabledTools field to both MCPServerConfig and StdioServerConfig, updated NewMCPServer to handle tool registration additively with toolsets |
| cmd/github-mcp-server/main.go | Added --tools flag, viper binding for the flag, and updated default toolset logic to only apply when neither tools nor toolsets are specified |
| go.mod | Marked github.com/google/go-querystring as indirect dependency |
| README.md | Added comprehensive documentation for --tools flag including examples with command line, environment variables, Docker usage, and composition patterns |
Overview
This PR adds support for tool-specific MCP configuration via a new
--toolsflag:--toolsto list which tools they would like to enable--tools,--toolsets,--read-onlyand--dynamic-toolsetsand compose them in whatever way they'd likeExample